/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package documenteditor.entidade.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author gleidson.moura
 */
@Entity
@Table(name="SERVICO")
@SequenceGenerator(name="GEN_SERVICO", sequenceName="GEN_SERVICO_ID")
public class Servico implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator="GEN_SERVICO")
    @Column(name="ID_SERVICO")
    private Long idServico;

    @Column(name="NOME_SERVICO", nullable=false)
    private String nomeServoco;

    @Column(name="VALOR_CUSTO_SERVICO")
    private Double valorcCustoServico;

    public Long getIdServico() {
        return idServico;
    }

    public void setIdServico(Long id) {
        this.idServico = id;
    }

    public String getNomeServoco() {
        return nomeServoco;
    }

    public void setNomeServoco(String nomeServoco) {
        this.nomeServoco = nomeServoco;
    }

    public Double getValorcCustoServico() {
        return valorcCustoServico;
    }

    public void setValorcCustoServico(Double valorcCustoServico) {
        this.valorcCustoServico = valorcCustoServico;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idServico != null ? idServico.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Servico)) {
            return false;
        }
        Servico other = (Servico) object;
        if ((this.idServico == null && other.idServico != null) || (this.idServico != null && !this.idServico.equals(other.idServico))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "documenteditor.entidade.model.Servoco[id=" + idServico + "]";
    }

}
